package siwi.map.android;

import android.util.Log;

import com.wmw.Utility.Common;

public class TimeParser {
	public static void Parse(int[]t, String timeOfDay){
		String []strArray = timeOfDay.split(" |~|:");
		Log.d(Common.GetLineInfo(), "strArray.length - " + strArray.length);
		for (int i = 0; i < strArray.length; ++i)
			Log.d(Common.GetLineInfo(), "i-th - " + i + ",[" + strArray[i] + "]");
		
		t[0] = Integer.parseInt(strArray[0]);
		t[1] = Integer.parseInt(strArray[1]);
		t[2] = Integer.parseInt(strArray[4]);
		t[3] = Integer.parseInt(strArray[5]);
	}
	
	public static String TimeConvertToString(int []t){
		return t[0] + ":" + t[1] + " ~ " + t[2] + ":" + t[3];
	}
}
